import request from '@/utils/request'

export default {

  //1.添加课时信息
  addVideo(video) {
    return request({
      url: `/video/add`,
      method: 'post',
      data: video
    })
  },

  //2.修改课时信息
  updateVideo(video) {
    return request({
      url: `/video/update`,
      method: 'post',
      data: video
    })
  },

  //3.删除课时信息
  deleteVideo(videoId) {
    return request({
      url: `/video/delete/${videoId}`,
      method: 'delete'
    })
  },

  //4.获取课时信息，回显
  getVideoInfo(videoId) {
    return request({
      url: `/video/get/${videoId}`,
      method: 'get'
    })
  },

  //5.根据视频id删除阿里云中的视频
  deleteVideoById(id) {
    return request({
      url: `/vod/deleteVod/${id}`,
      method: 'delete'
    })
  }
}
